package com.ccit.order.service;

import org.springframework.data.domain.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ccit.model.Order;

import java.util.Date;
import java.util.List;

public interface OrderService extends IService<Order> {

     void saveNewOrder(Order order,Integer num);

     //保存修改订单
     Boolean saveOrder(Order order);

     //根据id查询订单
     Order findOrderById(Long id);

     //根据id删除订单
     void deleteOrderById(Long id);

     //根据手机号查询订单
     List<Order> findOrderByPhone(String phone);

     //查询所有
     List<Order> findAllOrder();

     //条件查询
     List<Order> findOrderList(Order order);

     //模糊查询
     List<Order> findOrderLike(Order order);

     //分页查询
     Page<Order> findOrderPage(Integer currPage, Integer pageSize, Order order);

     //查询时间内的订单
     List<Order> findOrderByTime(Date startTime, Date endTime);

     //根据手机号分页查询订单
     Page<Order> findOrderPageByPhone(Integer currPage, Integer pageSize, Order order);

}
